package it.win4buy.events
{
    /**
     *
     *	autore:
     *  pierangelo.mancusi@gmail.com
     *
     */

    import flash.events.Event;

    public class PlaceHolderEvent extends Event
    {

        /**
         * Store the selected PlaceHolder.
         */
        public static const SET_SELECTED_INDEX:String="PlaceHolderEvent.SET_SELECTED_INDEX";

        /**
         *
         * Used to TRY  register the user in the PlaceHolder.
         *
         */
        public static const TRY_REGISTER_USER:String="PlaceHolderEvent.TRY_REGISTER_USER";


        /**
         *
         * Used to TRY  Unregister the user in the PlaceHolder.
         *
         */
        public static const TRY_UNREGISTER_USER:String="PlaceHolderEvent.TRY_UNREGISTER_USER";


        /**
         *
         * Used <b>ONLY</b> at startup to Refresh the<br>
         * PlaceHolderPM.placeHolderList
         */
        public static const STARTUP_REFRESH_PLACEHOLDER:String="PlaceHolderEvent.STARTUP_REFRESH_PLACEHOLDER";


        //-------------------------------------------
        //
        // Injected properties
        //
        //-------------------------------------------


        //-------------------------------------------
        //
        // Private Properties
        //
        //-------------------------------------------

        /**
         * Simply a Store Object
         */
        private var _obj:Object;


        //-------------------------------------------
        //
        // Getters / Setters
        //
        //-------------------------------------------

        public function get obj():Object
        {
            return _obj;
        }

        public function set obj(value:Object):void
        {
            _obj=value;
        }


        //-------------------------------------------
        //
        // Constructor
        //
        //-------------------------------------------

        public function PlaceHolderEvent(type:String, obj:Object=null, bubbles:Boolean=false, cancelable:Boolean=false)
        {
            super(type, bubbles, cancelable);
            this.obj=obj;
        }


        //-------------------------------------------
        //
        // Override Methods
        //
        //-------------------------------------------

        override public function clone():Event
        {

            return new PlaceHolderEvent(type, obj, bubbles, cancelable);

        }


    }
}